A Theoretical and Experimental Comparison of Algorithms for the Containment of Conjunctive Queries with Negation
نویسندگان
چکیده
We tackle the containment problem for conjunctive queries with negation, which takes two queries q1 and q2 as input and asks if q1 is contained in q2. A general approach for solving this problem consists of considering all completions of q1 (intuitively these completions represent all canonical databases that satisfy q1) and checking if each completion yields the same answer on q2. Since the total number of completions of q1 is exponential in the size of q1, several proposals have aimed at reducing the number (and the size) of the completions checked. In this paper, we propose a unifying framework for comparing algorithms following this general approach and define two kinds of heuristics for exploring the space of completions. Combining these heuristics with both classical kinds of traversals, i.e., depth-first and breadth-first, we obtain four algorithms that we compare experimentally with respect to running time on difficult instances of the containment problem.
منابع مشابه
Parallel-Correctness and Containment for Conjunctive Queries with Union and Negation
Single-round multiway join algorithms first reshuffle data over many servers and then evaluate the query at hand in a parallel and communicationfree way. A key question is whether a given distribution policy for the reshuffle is adequate for computing a given query, also referred to as parallel-correctness. This paper extends the study of the complexity of parallel-correctness and its constitue...
متن کاملContainment of Conjunctive Queries with Negation: Algorithms and Experiments
We consider the containment problem for conjunctive queries with atomic negation. Firstly, we refine an existing algorithm based on homomorphism checks, which itself improves other known algorithms in databases, and analyze it experimentally. Secondly, we present a new algorithm based on the translation of the containment problem into the problem of checking the unsatisfiability of a propositio...
متن کاملOn the Containment Problem for Queries with Safe Negation
We consider the problem of query containment for conjunctive queries with safe negation property. A special class of queries is specified. For this class an algorithm to test the containment problem is given. The time complexity of this algorithm is presented.
متن کاملQueries with Guarded Negation
A well-established and fundamental insight in database theory is that negation (also known as complementation) tends to make queries difficult to process and difficult to reason about. Many basic problems are decidable and admit practical algorithms in the case of unions of conjunctive queries, but become difficult or even undecidable when queries are allowed to contain negation. Inspired by re...
متن کاملSome Algorithmic Improvements for the Containment Problem of Conjunctive Queries with Negation
Query containment is a fundamental problem of databases. Given two queries q1 and q2, it asks whether the set of answers to q1 is included in the set of answers to q2 for any database. In this paper, we investigate this problem for conjunctive queries with negated subgoals. We use graph homomorphism as the core notion, which leads us to extend the results presented in [Ull97] and [WL03]. First,...
متن کامل